package com.panopset.gui;

import static com.panopset.Util.*;

import java.awt.event.ActionListener;

import javax.swing.JButton;


/**
 *
 * @author Karl Dinwiddie
 */
public class TButton extends JButton {
    private static final long serialVersionUID = VERSION_SERIAL_NUMBER;

    public TButton() {
        init();
    }

    public TButton(String text) {
        this();
        setText(text);
    }

    public TButton(String text, String tip) {
        this(text);
        setToolTipText(tip);
    }

    public TButton(String text, String tip, ActionListener listener) {
        this(text);
        setToolTipText(tip);
        this.addActionListener(listener);

    }

    public TButton(String text, int mnemonic, String tip, ActionListener listener) {
        this(text, tip, listener);
        this.setMnemonic(mnemonic);
    }

    public TButton(String text, int mnemonic, String tip) {
        this(text, tip);
        setMnemonic(mnemonic);
   }

    @Override
    public int getHeight() {
        return 20;
    }

    private void init() {
        setFont(ARIAL_PLAIN_10);
    }
}
